package com.zh.user.service.impl;

import com.zh.user.entity.SysRole;
import com.zh.user.mapper.SysRoleMapper;
import com.zh.user.service.SysRoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 张行
 * @since 2021-02-02
 */
@Service
public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements SysRoleService {

    @Autowired
    private SysRoleMapper sysRoleMapper;
    /**
     * description: 根据用户名获取当前用户角色
     * date: 2021年-04月-12日 15:26
     * author: zhanghang
     * 
     * @param username
     * @return java.util.List<java.lang.String>
     */ 
    @Override
    public List<String> getRoleByUsername(String username) {
        return sysRoleMapper.getRoleByUsername(username);
    }
}
